import logging
from logging.handlers import SysLogHandler

DEFAULT_LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
LOGGER = logging.getLogger(__name__)


def configure_logging():
    LOGGER.setLevel(logging.DEBUG)
    ch = SysLogHandler('/dev/log')
    formatter = logging.Formatter(DEFAULT_LOG_FORMAT)
    ch.setFormatter(formatter)
    LOGGER.addHandler(ch)


if __name__ == '__main__':
    configure_logging()
    LOGGER.info("hello, world.")
